﻿#if USE_UNI_LUA
using LuaAPI = UniLua.Lua;
using RealStatePtr = UniLua.ILuaState;
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
#else
using LuaAPI = XLua.LuaDLL.Lua;
using RealStatePtr = System.IntPtr;
using LuaCSFunction = XLuaBase.lua_CSFunction;
#endif

using XLua;
using System.Collections.Generic;


namespace XLua.CSObjectWrap
{
    using Utils = XLua.Utils;
    public class YoozooCoreCommonLoadingUtilsWrap 
    {
        public static void __Register(RealStatePtr L)
        {
			ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			System.Type type = typeof(Yoozoo.Core.Common.LoadingUtils);
			Utils.BeginObjectRegister(type, L, translator, 0, 0, 0, 0);
			
			
			
			
			
			
			Utils.EndObjectRegister(type, L, translator, null, null,
			    null, null, null);

		    Utils.BeginClassRegister(type, L, __CreateInstance, 16, 1, 0);
			Utils.RegisterFunc(L, Utils.CLS_IDX, "AddLoaderNameType", _m_AddLoaderNameType_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "AddLoadTask", _m_AddLoadTask_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "AddConstructTask", _m_AddConstructTask_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "RemoveConstructTask", _m_RemoveConstructTask_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "DisposeLoadingLoaders", _m_DisposeLoadingLoaders_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "DisposeAll", _m_DisposeAll_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "OnEnterScene", _m_OnEnterScene_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "OnLoadingUIShow", _m_OnLoadingUIShow_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "OnLoadingUIHide", _m_OnLoadingUIHide_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "OnCameraEnable", _m_OnCameraEnable_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "OnCameraDisable", _m_OnCameraDisable_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "DisposeTask", _m_DisposeTask_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "DisposeAllLoadingLoaders", _m_DisposeAllLoadingLoaders_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "RecodeTimeStart", _m_RecodeTimeStart_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "RecodeTimeEnd", _m_RecodeTimeEnd_xlua_st_);
            
			
            
			Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "LoadingTaskManager", _g_get_LoadingTaskManager);
            
			
			
            Utils.RegisterFunc(L, Utils.CLS_IDX, "New", __CreateInstanceNew);
			Utils.EndClassRegister(type, L, translator);
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int __CreateInstance(RealStatePtr L)
        {
            return LuaAPI.luaL_error(L, "Yoozoo.Core.Common.LoadingUtils does not have a constructor!");
        }

        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int __CreateInstanceNew(RealStatePtr L)
        {
            return LuaAPI.luaL_error(L, "Yoozoo.Core.Common.LoadingUtils does not have a constructor!");
        }

        
		
        
		
        
        
        
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_AddLoaderNameType_xlua_st_(RealStatePtr L)
        {
		    try {
            
            
            
                
                {
                    string _loaderName = LuaAPI.lua_tostring(L, 1);
                    int _type = LuaAPI.xlua_tointeger(L, 2);
                    
                    Yoozoo.Core.Common.LoadingUtils.AddLoaderNameType( _loaderName, _type );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_AddLoadTask_xlua_st_(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
            
			    int gen_param_count = LuaAPI.lua_gettop(L);
            
                if(gen_param_count == 1&& (LuaAPI.lua_isnil(L, 1) || LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TSTRING)) 
                {
                    string _taskName = LuaAPI.lua_tostring(L, 1);
                    
                        var gen_ret = Yoozoo.Core.Common.LoadingUtils.AddLoadTask( _taskName );
                        translator.Push(L, gen_ret);
                    
                    
                    
                    return 1;
                }
                if(gen_param_count == 3&& (LuaAPI.lua_isnil(L, 1) || LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TSTRING)&& (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING)&& translator.Assignable<Yoozoo.Managers.ResourceManagerV2.Runtime.Res.ResLoadCompleteCallBack>(L, 3)) 
                {
                    string _taskName = LuaAPI.lua_tostring(L, 1);
                    string _resPath = LuaAPI.lua_tostring(L, 2);
                    Yoozoo.Managers.ResourceManagerV2.Runtime.Res.ResLoadCompleteCallBack _callback = translator.GetDelegate<Yoozoo.Managers.ResourceManagerV2.Runtime.Res.ResLoadCompleteCallBack>(L, 3);
                    
                        var gen_ret = Yoozoo.Core.Common.LoadingUtils.AddLoadTask( _taskName, _resPath, _callback );
                        translator.Push(L, gen_ret);
                    
                    
                    
                    return 1;
                }
                if(gen_param_count == 2&& (LuaAPI.lua_isnil(L, 1) || LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TSTRING)&& (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING)) 
                {
                    string _taskName = LuaAPI.lua_tostring(L, 1);
                    string _resPath = LuaAPI.lua_tostring(L, 2);
                    
                        var gen_ret = Yoozoo.Core.Common.LoadingUtils.AddLoadTask( _taskName, _resPath );
                        translator.Push(L, gen_ret);
                    
                    
                    
                    return 1;
                }
                if(gen_param_count == 4&& (LuaAPI.lua_isnil(L, 1) || LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TSTRING)&& translator.Assignable<System.Collections.Generic.List<string>>(L, 2)&& translator.Assignable<Yoozoo.Managers.ResourceManagerV2.Runtime.Res.ResLoadCompleteCallBack>(L, 3)&& translator.Assignable<System.Action>(L, 4)) 
                {
                    string _taskName = LuaAPI.lua_tostring(L, 1);
                    System.Collections.Generic.List<string> _resPaths = (System.Collections.Generic.List<string>)translator.GetObject(L, 2, typeof(System.Collections.Generic.List<string>));
                    Yoozoo.Managers.ResourceManagerV2.Runtime.Res.ResLoadCompleteCallBack _callBack = translator.GetDelegate<Yoozoo.Managers.ResourceManagerV2.Runtime.Res.ResLoadCompleteCallBack>(L, 3);
                    System.Action _completeCallback = translator.GetDelegate<System.Action>(L, 4);
                    
                        var gen_ret = Yoozoo.Core.Common.LoadingUtils.AddLoadTask( _taskName, _resPaths, _callBack, _completeCallback );
                        translator.Push(L, gen_ret);
                    
                    
                    
                    return 1;
                }
                if(gen_param_count == 3&& (LuaAPI.lua_isnil(L, 1) || LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TSTRING)&& translator.Assignable<System.Collections.Generic.List<string>>(L, 2)&& translator.Assignable<Yoozoo.Managers.ResourceManagerV2.Runtime.Res.ResLoadCompleteCallBack>(L, 3)) 
                {
                    string _taskName = LuaAPI.lua_tostring(L, 1);
                    System.Collections.Generic.List<string> _resPaths = (System.Collections.Generic.List<string>)translator.GetObject(L, 2, typeof(System.Collections.Generic.List<string>));
                    Yoozoo.Managers.ResourceManagerV2.Runtime.Res.ResLoadCompleteCallBack _callBack = translator.GetDelegate<Yoozoo.Managers.ResourceManagerV2.Runtime.Res.ResLoadCompleteCallBack>(L, 3);
                    
                        var gen_ret = Yoozoo.Core.Common.LoadingUtils.AddLoadTask( _taskName, _resPaths, _callBack );
                        translator.Push(L, gen_ret);
                    
                    
                    
                    return 1;
                }
                if(gen_param_count == 2&& (LuaAPI.lua_isnil(L, 1) || LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TSTRING)&& translator.Assignable<System.Collections.Generic.List<string>>(L, 2)) 
                {
                    string _taskName = LuaAPI.lua_tostring(L, 1);
                    System.Collections.Generic.List<string> _resPaths = (System.Collections.Generic.List<string>)translator.GetObject(L, 2, typeof(System.Collections.Generic.List<string>));
                    
                        var gen_ret = Yoozoo.Core.Common.LoadingUtils.AddLoadTask( _taskName, _resPaths );
                        translator.Push(L, gen_ret);
                    
                    
                    
                    return 1;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
            return LuaAPI.luaL_error(L, "invalid arguments to Yoozoo.Core.Common.LoadingUtils.AddLoadTask!");
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_AddConstructTask_xlua_st_(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
            
                
                {
                    string _taskName = LuaAPI.lua_tostring(L, 1);
                    System.Action _action = translator.GetDelegate<System.Action>(L, 2);
                    int _type = LuaAPI.xlua_tointeger(L, 3);
                    
                        var gen_ret = Yoozoo.Core.Common.LoadingUtils.AddConstructTask( _taskName, _action, _type );
                        translator.Push(L, gen_ret);
                    
                    
                    
                    return 1;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_RemoveConstructTask_xlua_st_(RealStatePtr L)
        {
		    try {
            
            
            
                
                {
                    string _taskName = LuaAPI.lua_tostring(L, 1);
                    
                    Yoozoo.Core.Common.LoadingUtils.RemoveConstructTask( _taskName );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_DisposeLoadingLoaders_xlua_st_(RealStatePtr L)
        {
		    try {
            
            
            
                
                {
                    
                    Yoozoo.Core.Common.LoadingUtils.DisposeLoadingLoaders(  );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_DisposeAll_xlua_st_(RealStatePtr L)
        {
		    try {
            
            
            
                
                {
                    
                    Yoozoo.Core.Common.LoadingUtils.DisposeAll(  );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_OnEnterScene_xlua_st_(RealStatePtr L)
        {
		    try {
            
            
            
                
                {
                    string _sceneName = LuaAPI.lua_tostring(L, 1);
                    
                    Yoozoo.Core.Common.LoadingUtils.OnEnterScene( _sceneName );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_OnLoadingUIShow_xlua_st_(RealStatePtr L)
        {
		    try {
            
            
            
                
                {
                    
                    Yoozoo.Core.Common.LoadingUtils.OnLoadingUIShow(  );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_OnLoadingUIHide_xlua_st_(RealStatePtr L)
        {
		    try {
            
            
            
                
                {
                    
                    Yoozoo.Core.Common.LoadingUtils.OnLoadingUIHide(  );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_OnCameraEnable_xlua_st_(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
            
                
                {
                    Yoozoo.HRP.Runtime.HCamera _hCamera = (Yoozoo.HRP.Runtime.HCamera)translator.GetObject(L, 1, typeof(Yoozoo.HRP.Runtime.HCamera));
                    
                    Yoozoo.Core.Common.LoadingUtils.OnCameraEnable( _hCamera );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_OnCameraDisable_xlua_st_(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
            
                
                {
                    Yoozoo.HRP.Runtime.HCamera _hCamera = (Yoozoo.HRP.Runtime.HCamera)translator.GetObject(L, 1, typeof(Yoozoo.HRP.Runtime.HCamera));
                    
                    Yoozoo.Core.Common.LoadingUtils.OnCameraDisable( _hCamera );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_DisposeTask_xlua_st_(RealStatePtr L)
        {
		    try {
            
            
            
                
                {
                    string _taskName = LuaAPI.lua_tostring(L, 1);
                    
                    Yoozoo.Core.Common.LoadingUtils.DisposeTask( _taskName );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_DisposeAllLoadingLoaders_xlua_st_(RealStatePtr L)
        {
		    try {
            
            
            
                
                {
                    
                    Yoozoo.Core.Common.LoadingUtils.DisposeAllLoadingLoaders(  );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_RecodeTimeStart_xlua_st_(RealStatePtr L)
        {
		    try {
            
            
            
                
                {
                    string _recodeName = LuaAPI.lua_tostring(L, 1);
                    
                    Yoozoo.Core.Common.LoadingUtils.RecodeTimeStart( _recodeName );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_RecodeTimeEnd_xlua_st_(RealStatePtr L)
        {
		    try {
            
            
            
                
                {
                    string _recodeName = LuaAPI.lua_tostring(L, 1);
                    
                    Yoozoo.Core.Common.LoadingUtils.RecodeTimeEnd( _recodeName );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        
        
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_LoadingTaskManager(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			    translator.Push(L, Yoozoo.Core.Common.LoadingUtils.LoadingTaskManager);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        
        
		
		
		
		
    }
}
